package com.tajiang.business.businesscount.util;

import com.tajiang.business.common.http.HttpHandler;
import com.tajiang.business.common.http.HttpResponseListener;

import okhttp3.RequestBody;

/**
 * Created by Admins on 2016/12/28.
 */
public class TJHttpUtil {

    public final static int CODE_RESPONSE_NEED_LOGIN = 10001;
    public final static int CODE_RESPONSE_PERFORMED_FAILED = 12001;
    public final static int CODE_RESPONSE_NEED_AUTH = 14001;
    public final static int CODE_RESPONSE_IN_CHECKING = 14002;
    public final static int CODE_RESPONSE_AUTH_FAIL = 14003;

    private static HttpResponseListener listener;
    private static TJHttpUtil tjHttpUtil;
    private static final int pageSize = 10;

    public static TJHttpUtil getInstance(HttpResponseListener listener) {
        TJHttpUtil.listener = listener;
        if (tjHttpUtil == null) {
            synchronized (TJHttpUtil.class) {
                tjHttpUtil = new TJHttpUtil();
            }
        }
        return tjHttpUtil;
    }

    /*
       * 修改头像
       * */
    public void upLoadUserIcon(RequestBody Body) {
        new HttpHandler(listener).upLoadUserIcon(Body, 101);
    }
}
